package xyz.liuyuhe.StudySpring.ch6;

import org.springframework.context.ConfigurableApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class Main {
    public static void main(String[] args) {
        ConfigurableApplicationContext context = new ClassPathXmlApplicationContext("classpath*:ch6/Beans.xml");
        System.out.println(System.identityHashCode(context.getBean("helloWorld", HelloWorld.class)));
        System.out.println(System.identityHashCode(context.getBean("helloWorld", HelloWorld.class)));
        
        context.getBean("helloWorld", HelloWorld.class).getMessage();
        
        context.close();
    }
}
